ar X iv : 1 40 1 . 53 91 v 1 [ cs . P L ] 2 1 Ja n 20 14 The semantic marriage of monads and effects Extended abstract Dominic Orchard

نویسندگان

  • Dominic Orchard
  • Tomas Petricek
  • Alan Mycroft
چکیده

Wadler and Thiemann unified type-and-effect systems with monadic semantics via a syntactic correspondence and soundness results with respect to an operational semantics. They conjecture that a general, “coherent” denotational semantics can be given to unify effect systems with a monadic-style semantics. We provide such a semantics based on the novel structure of an indexed monad, which we introduce. We redefine the semantics of Moggi’s computational λ-calculus in terms of (strong) indexed monads which gives a oneto-one correspondence between indices of the denotations and the effect annotations of traditional effect systems. Dually, this approach yields indexed comonads which gives a unified semantics and effect system to contextual notions of effect (called coeffects), which we have previously described [9]. Previously, Wadler and Thiemann established a syntactic correspondence between type-and-effect systems and the monadic semantics approach by annotating monadic type constructors with the effect sets of the type-and-effect system [10]. They established soundness results between the effect system and an operational semantics, and conjectured a “coherent semantics” of effects and monads in a denotational style. One suggestion was to associate to each effect set σ a different monad T . We take a different approach to a coherent semantics, unifying effect systems with a monadic-style semantics in terms of the novel notion of indexed monads, which generalises monads. Indexed monads Indexed monads comprise a functor

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Rotation of Sequences: Algorithms and Proofs

Sequence rotation consists of a circular shift of the sequence’s elements by a given number of positions. We present the four classic algorithms to rotate a sequence; the loop invariants underlying their correctness; detailed correctness proofs; and fully annotated versions for the Boogie verifier. The presentation illustrates in detail both how the algorithms work and what it takes to carry ou...

متن کامل

ar X iv : 1 40 6 . 46 48 v 1 [ cs . F L ] 1 8 Ju n 20 14 Optimal Strategy Synthesis for Request - Response Games ∗ Florian Horn

We show the existence and effective computability of optimal winning strategies for request-response games in case the quality of a play is measured by the limit superior of the mean accumulated waiting times between requests and their responses.

متن کامل

ar X iv : 1 20 1 . 52 98 v 1 [ cs . C C ] 2 5 Ja n 20 12 Scrabble is PSPACE - Complete

In this paper we study the computational complexity of the game of Scrabble. We prove the PSPACE-completeness of a derandomized model of the game, answering an open question of Erik Demaine and Robert Hearn.

متن کامل

ar X iv : 0 90 1 . 46 64 v 1 [ cs . L O ] 2 9 Ja n 20 09 Square root meadows ∗

Let Q0 denote the rational numbers expanded to a meadow by totalizing inversion such that 0 = 0. Q0 can be expanded by a total sign function s that extracts the sign of a rational number. In this paper we discuss an extension Q0(s, √ ) of the signed rationals in which every number has a unique square root.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2014